package com.example.lots_of_demo.controller;

import com.example.lots_of_demo.service.MenuService;
import com.example.lots_of_demo.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : LZJ
 * @description : code for LZJ
 * @date : 2021/2/13
 */
@RestController
@RequestMapping("/menu")
public class MenuController extends BaseController{

    @Autowired
    private MenuService menuService;

    @GetMapping("/getMenu")
    @PreAuthorize("hasAuthority('RES_getMenu')")
    public R getMenu(){
        return menuService.getMenu();
    }

}
